package com.it.controller;

import com.it.pojo.Container;
import com.it.service.ContainerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: zgc
 * @version: 1.0
 * @description:
 * @date: 2023/12/27 10:43
 */
@Controller
@RequestMapping("/con")
public class ContainerController {

    @Autowired
    private ContainerService containerService;

    @GetMapping("/list")
    public String list(){
        return "pages/container/container";
    }

    @PostMapping("/add")
    public String add(Container container){
        containerService.addContainer(container);
        return "index";
    }

}
